//const process  = require('process')
const jsonServer = require('json-server')
const server = jsonServer.create()
const router = jsonServer.router('./mock2/data.json')
const middlewares = jsonServer.defaults()
const port = 4000

console.log(process.cwd())

server.use(middlewares)
server.use(jsonServer.bodyParser)
server.use(router)
server.listen(port, () => {
  console.log(`JSON Mock Server running at: ${port}`)
})
